Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

532
Vistas
What's "ANSI_X3.4-1968" encoding?

See following output on my system:

[STEP 101] # python3 -c 'import sys; print(sys.stdout.encoding)'
ANSI_X3.4-1968
[STEP 102] #
[STEP 103] # locale
LANG=C
LANGUAGE=en_US:en
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
[STEP 104] #

Googled but found very little info about it. Even Python's The Python Library Reference (v3.5.2) does not mention it. Any international standard defines it?


(Copied the authoritative ref from the accepted answer's comment: Character Sets)

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

This is another name for USAS X3.4-1968, a revision of ASCII that is distinguished by being:

  • the first revision to allow a linefeed (LF) to occur on its own (i.e. not preceded by or followed by a carriage return (CR)).

  • the revision that introduced the common name of (US-)ASCII.

This is basically ASCII as we think of it, although there were two minor revisions that followed it.

over 4 years ago · Santiago Trujillo Denunciar

0

If you're curious where it comes from in cpython, the value is computed from the locale module using langinfo.

Here's a tiny C program which demonstrates how the _locale module determines this information:

#include <langinfo.h>
#include <locale.h>
#include <stdio.h>

int main () {
    setlocale(LC_ALL, "");
    printf("%s\n", nl_langinfo(CODESET));
    return 0;
}

And some sample output:

$ LANG= ./a.out 
ANSI_X3.4-1968
$ LANG=en_US.UTF-8 ./a.out 
UTF-8

python normalizes the ansi name to ascii (or US-ASCII)

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda